package com.huang.app.demo5.vm

import android.app.Application
import android.view.View
import androidx.lifecycle.MutableLiveData
import com.huang.mvvm.action.FragmentActions
import com.huang.mvvm.fragment.BaseFragment
import com.huang.mvvm.model.BaseModel
import com.huang.mvvm.vm.base.BaseFragmentViewModel
import com.huang.router.router.AppRouter

class Demo5FirstViewModel(application: Application) :
    BaseFragmentViewModel<BaseModel>(application) {
    override fun getModel(): Class<BaseModel>? = null

    override fun onCreateActions(): FragmentActions? = null

    var position = MutableLiveData(1)

    fun onClickTxt(view: View) {
        val rootFragment =
            AppRouter.build(AppRouter.DEMO5_ROOT_FRAGMENT).navigation() as BaseFragment<*, *>
        start(rootFragment,true)
    }

}